package com.hdaccp.shuiguoD.service.impl;

import com.hdaccp.shuiguoD.dao.RoleDao;
import com.hdaccp.shuiguoD.entity.Role;
import com.hdaccp.shuiguoD.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;

    @Override
    public List<Role> getAll() {
        return roleDao.queryAll();
    }

    @Override
    public long findCount(String rname) {
        return roleDao.getTotalCount(rname);
    }

    @Override
    public List<Role> findAll(String rname, int limit, int offset) {
        return roleDao.query(rname,limit,offset);
    }


}
